<sv-container  style="margin-bottom: 20px;">
    <sv-title>门禁卡信息</sv-title>
</sv-container>
<form nz-form  [formGroup]="validateForm" (ngSubmit)="submitForm(validateForm.value)">
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>持卡人</nz-form-label>
      <nz-form-control [nzSpan]="8" nzErrorTip="请输入姓名!">
        <input nz-input  placeholder="" formControlName="userName" readonly/>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>门禁卡</nz-form-label>
      <nz-form-control [nzSpan]="8" nzErrorTip="卡号不能为空!" >
        <nz-select nzShowSearch nzAllowClear formControlName="cardNo" [ngModel]="cardNo">
          <nz-option nzLabel="" nzValue=""></nz-option>>
            <nz-option nzLabel="{{item.cardNo}}" nzValue="{{item.cardNo}}" *ngFor="let item of cardList"></nz-option>
          </nz-select>
          <!-- <input nz-input  placeholder="" (blur)="iptBlur()" [(ngModel)]="cardNo" formControlName="cardNo"/> -->
      </nz-form-control>
      <nz-form-control [nzSpan]="1" style="margin-left: 10px;" *ngIf="show">
        <a nz-button nzType="primary" (click)="read()" >读cpu卡(加密)</a>
      </nz-form-control>
      <nz-form-control [nzSpan]="1" style="margin-left: 66px;" *ngIf="show">
        <a nz-button nzType="primary" (click)="readID()" >读身份证</a>
      </nz-form-control>
      <nz-form-control [nzSpan]="1" style="margin-left: 30px;" *ngIf="show">
        <a nz-button nzType="primary" (click)="readCpu()" >读物理卡号</a>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>虚拟卡号</nz-form-label>
      <nz-form-control [nzSpan]="8" nzErrorTip="虚拟卡号不能为空!" >
        <input nz-input  placeholder="" formControlName="xnCardNo"/>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>卡编号</nz-form-label>
      <nz-form-control [nzSpan]="8" nzErrorTip="卡编号不能为空!">
        <input nz-input  placeholder="" formControlName="cardCode"/>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>钥匙类型</nz-form-label>
      <nz-form-control [nzSpan]="8">
            <label nz-radio [ngModel]=true name="va" formControlName="doorCard">门禁卡</label>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2" nzRequired>有效期</nz-form-label>
      <nz-form-control [nzSpan]="3" nzErrorTip="请选择时间!">
        <nz-date-picker formControlName="date" (ngModelChange)="onChange($event)"></nz-date-picker>
      </nz-form-control>
      <nz-form-control [nzSpan]="18">
            <ul class="monthBox">
                <li *ngFor="let item of monthList index as i" [ngClass]="{'curr':item.selected}" (click)="monthClick(item,i)">
                    {{item.value}}
                </li>
            </ul>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSpan]="2">备注</nz-form-label>
      <nz-form-control [nzSpan]="8">
        <textarea  nz-input rows="2" formControlName="remark"></textarea>
      </nz-form-control>
    </nz-form-item>
    <!-- <sv-container col="1" labelWidth="100" >
        <sv-title>费用统计</sv-title>
        <sv label="押金">{{cashMoney}}</sv>
        <sv label="管理费">{{manageMoney}} ({{month}}个月)</sv>
        <sv label="总计">{{totalMoney}}</sv>
    </sv-container> -->
    <sv-container style="margin-bottom: 40px;margin-top: 20px;">
        <sv-title>门禁权限</sv-title>
        <sv *ngFor="let item of permissionList">{{item.houseName}}</sv>
    </sv-container>
    <nz-form-item style="text-align: center;">
      <nz-form-control [nzOffset]="7" [nzSpan]="12">
        <button nz-button nzType="primary">提交</button>
        <button nz-button (click)="resetForm($event)">重置</button>
      </nz-form-control>
    </nz-form-item>
  </form>

